package serverdata;


public class uniqueid {
	
	public int id = 0;
	public boolean setid(int old_id)
	{
		try
		{
			synchronized(this)
			{
				id = old_id;
			}
			return true;
		}
		catch(Exception e)
		{
			e.printStackTrace();
			return false;
		}
	}
	
	public int getid()
	{
		try
		{
			synchronized(this)
			{
				id++;
				return id;
			}
		}
		catch(Exception e)
		{
			e.printStackTrace();
			return -1;
		}
	}

}
